package com.kai.spring.demo;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.DependsOn;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.Collections;
import java.util.Map;

/**
 * Created by wukai on 07/07/2017.
 */
@Controller
@RequestMapping("/demo")
public class DemoAcontroller {

    private DemoBean bean = (DemoBean) DemoAware.getBean("demoBean");

    @RequestMapping("/print")
    public Map<String, String> print() {
        bean.print();
        return Collections.singletonMap("success", "print a");
    }
}
